/*package com.example.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.entity.Scholarship;
import com.example.mapper.ScholarshipMapper;
import com.example.service.IScholarshipService;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ScholarshipServiceImpl extends ServiceImpl <ScholarshipMapper, Scholarship> implements IScholarshipService {

    @Override
    public Page<Scholarship> page(Integer current, Integer size, String scholarship_name) {
        LambdaQueryWrapper<Scholarship> wrapper = new LambdaQueryWrapper<>();
        if (!"".equals(scholarship_name)) {

            //wrapper.eq(Student::getStudent_name,student_name);
            wrapper.like(Scholarship::getScholarship_name, scholarship_name);
        }
        Page<Scholarship> page = page(new Page<>(
                        current,
                        size
                ),
                wrapper
        );
        return page;
    }

    @Override
    public boolean saveOrUpdateById(Scholarship scholarship){
       if (scholarship.getScholarship_no() != null) {
        return updateById(scholarship);
          } else {
         return save(scholarship);
    }

}

    @Override
    public boolean deleteBatchIds(List<Integer> scholarship_nos) {
         {
            return removeBatchByIds(scholarship_nos);
        }
    }
}*/
